/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fix.it.source.fixit;

import java.util.logging.Logger;
import javax.interceptor.AroundInvoke;
import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;

/**
 *
 * @author Aleksandra
 */
@Interceptor
@NewUserInterceptor
public class NewUser {
    @AroundInvoke
    public Object log(InvocationContext context)
            throws
            Exception {
        Logger.getLogger(getClass().getName()).info(context.getMethod().getName());
        Logger.getLogger(getClass().getName()).info(context.getParameters()[0].toString());
        System.out.println("LOGGERRR"+context.getParameters()[0].toString());
        return context.proceed();
    }
}
